<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../admin/authority.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="headScriptAD.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/admin/cs82000script.js">   
</script>
</head>
<body>
<input type="hidden" id="url_address" name="url_address" value="">
<input type="hidden" id="agent_browser" name="agent_browser" value="">
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
			<!-- End Side Menu -->

			<div class="col-sm-12 col-xs-12" id="right-side">
				<div id="navigator-bar">
					<i class="fa fa-home"></i> หน้าหลัก <i
						class="fa fa-angle-right ml-5 mr-5"> ข่าวประชาสัมพันธ์สำหรับระบบ</i>
				</div>
				<!--End navigator-bar-->			
<!-- ---------------------------------------------------------------------------------- -->
				<!-- Start detail-area -->
				<div>
					<div id="page-header" class="clearfix">
					ข่าวประชาสัมพันธ์สำหรับระบบ
					</div>
					<div id="success_message" class="alert alert-success hide"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-check fa-stack-1x fa-inverse"></i> </span><span id="content_sucess"></span></div>
					<div id="error_message" class="alert alert-danger hide"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-times fa-stack-1x fa-inverse"></i></span><span id="content_error"></span></div>
			<!-- Start detail-area -->
			<div>
				<!-- Start form-detail -->
				<div class="form-detail clearfix">
					
						<div class="search-box  no-radius">
							<div class="form-group clearfix search-header no-radius">
								<div class="pull-left">เพิ่มข้อมูลข่าวประชาสัมพันธ์สำหรับระบบ</div>
								<div class="pull-right">
									<div id="hide-button"><i class="fa fa-chevron-circle-up "></i></div>
								</div>
							</div>
							<div id="box-body">
								<div class="form-group clearfix mt-20 ">
								
								<div class="col-sm-2 mt-5"></div>
								<div class="col-sm-3 mt-5" style="padding-left: 10px;" >
										<div class="pull-left mt-5 ">
										<label for="inputCode">วันที่เริ่มต้น</label>
								 		<div class="input-group date">
												<input type='text' id='datetimepicker1' data-provide="datepicker" data-date-language="th-th" class="form-control" placeholder="วันที่เริ่มต้น" value="" />
												<span class="input-group-addon" id="spanDatetimepicker1"><span class="glyphicon glyphicon-calendar"></span></span>
										</div>
									</div>
								</div>
								
								<div class="col-sm-3 mt-5">
									<div class="pull-left mt-5 ">
										<label for="inputCode">วันที่สิ้นสุด</label>
								 		<div class="input-group date">
												<input type='text' id='datetimepicker2' data-provide="datepicker" data-date-language="th-th" class="form-control" placeholder="วันที่สิ้นสุด" value="" />
												<span class="input-group-addon" id="spanDatetimepicker2"><span class="glyphicon glyphicon-calendar"></span></span>
										</div>
									</div>
								</div>
				  			</div>
				  			
				  			<div class="form-group clearfix mt-10 ">
					  			<div class="form-group">
						  			<div class="col-sm-12 mt-5">
						  			<div class="col-sm-2 mt-5"></div>
						  				<div class="pull-left mt-5  ">
											<label for="inputCode">หัวข้อข่าว</label>
									 		<div class="input-group ">
												<input type="text" class="form-control" id="topic" style="width:500px;"/>	
											</div>
										</div>
						  			</div>
					  			</div>
				  			</div>
				  			
				  			<div class="form-group clearfix mt-10 ">
				  			<div class="form-group">
								<div class="col-sm-12 mt-5">
								<div class="col-sm-2 mt-5"></div>
					  				<div class="pull-left mt-5 ">
											<label for="inputCode">รายละเอียดข่าว</label>
									 		<div class="input-group ">
												<textarea class="form-control" rows="5" id="detail" style="width:501px;"></textarea>	
											</div>
									</div>
								</div>
				  			</div>
				  			</div>
				  			
				  			<div class="form-group clearfix mt-10 ">
				  			
				  			
				  			<div class="from-group">
				  				<div class="col-sm-12 mt-5">
				  					<div class="col-sm-2 mt-5"></div>
				  					<img id ="displayImage" src="" style="width:100px;height:100px;">
				  				</div>
				  			</div>
				  			
				  			<div class="form-group">
								<div class="col-sm-12 mt-5">
								<div class="col-sm-2 mt-5"></div>
								
								<form id="UploadFileImage" method="post" enctype="multipart/form-data"  action="../sm/CS11013Srvl">
					  				<div class="pull-left mt-5 ">
					  				<label for="">อัพโหลดไฟล์รูปภาพ</label>
					  					<div class="input-group ">
											<span class="btn btn-default btn-file">
   												  <input type="file" id="nameImage" name="fileImage" class="filestyle"  style="width:200px;">
											</span>
										</div>
									</div>
								</form>
								
									<div class="col-sm-3 " >
						  				<div class="checkbox" style="margin-top: 35px; padding-left: 50px;">
										      <input type="checkbox" id="check_pin"><label> ปักหมุด </label>
										 </div>
									</div>
									
								</div>
				  			</div>
				  			</div>
				  			
								<div class="form-group mt-20 clearfix search-footer no-radius">
									<div class="col-sm-12 text-center">
										<button  onclick="SaveNew()" type="button" id="saveReader" class="btn btn-primary"><i class="fa fa-floppy-o"></i> บันทึก</button>
										<!-- <button  type="button" id="saveReader1" class="btn btn-primary"><i class="fa fa-floppy-o"></i> บันทึก adf </button> -->
										<button  type="button" id="refresh" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> ล้างข้อมูล</button>
									</div>
								</div>
							</div>
							<!-- END BOX-BODY -->
						</div>
				</div>
				<!-- End detail-area -->
				<div class="form-detail clearfix" style="margin-top:-10px;padding-top: 0px;">
				<div class="form-list" id="form-list" style="padding-top: 10px;">
						<div class="list-detail-area">						
						<table id="NewsSystem" class="stripe hover cell-border" cellspacing="0" width="100%" align="center">
        					<thead>
            					<tr style="background-color: #399bca; color:white; font-size: 0.9em;">
                					<th style="border-right: 1px solid #999">ลำดับ</th>
                					<th style="border-right: 1px solid #999">ปักหมุด</th>
                					<th style="border-right: 1px solid #999">รูปภาพ</th>
                					<th style="border-right: 1px solid #999">หัวข้อข่าว</th>
                					<th style="border-right: 1px solid #999">รายละเอียด</th>
									<th style="border-right: 1px solid #999">วันที่เริ่มต้น</th>
									<th style="border-right: 1px solid #999">วันที่สิ้นสุด</th>
									<th>จัดการ</th>
            					</tr>
        					</thead> 						
    					</table>
    					<input type="hidden" name="oldTopic" id="oldTopic" value=""/>	
    					<input type="hidden" name="oldNameImage" id="oldNameImage" value=""/>
    					<input type="hidden" name="oldStartDate" id="oldStartDate" value=""/>	
    					<input type="hidden" name="oldEndDate" id="oldEndDate" value=""/>	
    					<input type="hidden" name="dataDelete1" id="dataDelete1" value=""/>			
    					<input type="hidden" name="dataDelete2" id="dataDelete2" value=""/>			
    					<input type="hidden" name="dataDelete3" id="dataDelete3" value=""/>	
    					<input type="hidden" name="dataDelete4" id="dataDelete4" value=""/>	
						</div>
				
				</div>
				<div class="modal fade" id="confirmUpdateModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
				   <div class="modal-dialog" style="width: 400px">
				        <div class="modal-content">
				            <div class="modal-header">
				            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				            <h4 class="modal-title">ยืนยันการบันทึกข้อมูลข่าวประชาสัมพันธ์</h4>
				            </div>
				            <div class="modal-body">
				            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
				            	<span id="modal_content_confirmUpdateModal"></span>
				            </div>
				            <div class="modal-footer">
				                <button onclick="updateDataTable()" type="button"  class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
				                <button onclick="cancel()" button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
				        	</div>
				    	</div>
				  	</div>
				</div>
					<div class="modal fade" id="confirmSaveModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
				    <div class="modal-dialog" style="width: 400px">
				        <div class="modal-content">
				            <div class="modal-header">
				            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				            <h4 class="modal-title">ยืนยันการบันทึกข้อมูลข่าวประชาสัมพันธ์</h4>
				            </div>
				            <div class="modal-body">
				            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
				            	<span id="modal_content_confirmSaveModal"></span>
				            </div>
				            <div class="modal-footer">
				                <button onclick="addDataTable()" type="button"  class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
				                <button onclick="cancel()"  type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
				        	</div>
				    	</div>
				  	</div>
				</div>
				<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
				    <div class="modal-dialog" style="width: 400px">
				        <div class="modal-content">
				            <div class="modal-header">
				            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				            <h4 class="modal-title">ยืนยันการลบข้อมูลข่าวประชาสัมพันธ์</h4>
				            </div>
				            <div class="modal-body">
				            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
				            	<span id="modal_content_confirmModal"></span>
				            </div>
				            <div class="modal-footer">
				                <button onclick="confirmdeleteData()" type="button"  class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
				                <button onclick="cancel()" type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
				        	</div>
				    	</div>
				  	</div>
				</div>
				<div class="modal fade" id="warningModal" tabindex="-1" role="dialog" aria-labelledby="warningModal" aria-hidden="true">
			  	  <div class="modal-dialog" style="width: 400px">
			        <div class="modal-content">
			            <div class="modal-header">
			            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			            <h4 class="modal-title">กรุณากรอกข้อมูลให้ถูกต้อง</h4>
			            </div>
			            <div class="modal-body">
			            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
			            	<span id="modal_content"></span>
			            </div>
			            <div class="modal-footer" style="text-align: center;">
			                <button type="button" class="btn btn-primary" data-dismiss="modal"> ตกลง</button>    
			        	</div>
			    	</div>
			  	</div>
			</div>
			
			<div class="modal fade" id="warningNumModal" tabindex="-1" role="dialog" aria-labelledby="warningModal" aria-hidden="true">
			  	  <div class="modal-dialog" style="width: 400px">
			        <div class="modal-content">
			            <div class="modal-header">
			            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			            <h4 class="modal-title">กรุณากรอกข้อมูลให้ถูกต้อง</h4>
			            </div>
			            <div class="modal-body">
			            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
			            	<span id="modal_numcontent"></span>
			            </div>
			            <div class="modal-footer" style="text-align: center;">
			                <button type="button" class="btn btn-primary" data-dismiss="modal"> ตกลง</button>    
			        	</div>
			    	</div>
			  	</div>
			</div>
			</div>
			<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดย การประปานครหลวง</div>
		
			</div>
			<!-- End detail-area -->
			
		</div>	
				</div>
				</div>
	</div>
</body>
</html>